package Customer;

use Moose;

has '_name' => (
	isa => 'Str',
	is => 'ro',
);

has '_rentals' => (
	default => 'NewRentals',
);

sub NewRentals {
	return ();
}

sub addRental {
	my $self = shift;
	
	# push (@$self->{ _rentals }, shift); 这样会有语法错误
	push (@{ $self->{ _rentals } }, shift);

	print @$self->{ _rentals };
}

sub statement {

	return shift;
}

1;